<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%
 String contextPath = request.getContextPath();
%>
<!DOCTYPE html>
<html>
<head>
<title>WORD版分析报告导出</title>
<link rel='stylesheet' text="type/css"
	href="<%=request.getContextPath()%>/lib/inputStyle/input.css">
<script src="<%=request.getContextPath()%>/lib/inputStyle/input_report.js"></script>
<style type="text/css">
#hospInfo {
	width: 550px;
	margin-top: 40px;
	margin-bottom: 40px;
	text-align: center;
	padding: 20px 50px;
	border-radius: 10px;
	border: 1px solid #ddd;
	box-shadow: 0 15px 80px rgba(0, 0, 0, .2);
	background-color: white;
}

.ue-animation, [required="required"] {
	-webkit-backface-visibility: hidden;
	-moz-backface-visibility: hidden;
	-ms-backface-visibility: hidden;
	-o-backface-visibility: hidden;
	backface-visibility: hidden;
	-webkit-animation-duration: .8s;
	-webkit-animation-delay: .2s;
	-webkit-animation-timing-function: ease;
	-webkit-animation-fill-mode: both;
	-moz-animation-duration: .8s;
	-moz-animation-delay: .2s;
	-moz-animation-timing-function: ease;
	-moz-animation-fill-mode: both;
	-ms-animation-duration: .8s;
	-ms-animation-delay: .2s;
	-ms-animation-timing-function: ease;
	-ms-animation-fill-mode: both;
	-o-animation-duration: .8s;
	-o-animation-delay: .2s;
	-o-animation-timing-function: ease;
	-o-animation-fill-mode: both;
	animation-duration: .8s;
	animation-delay: .2s;
	animation-timing-function: ease;
	animation-fill-mode: both
}

.ue-shake {
	-webkit-animation-name: shake;
	-moz-animation-name: shake;
	-o-animation-name: shake;
	animation-name: shake
}

@
-webkit-keyframes shake { 0%,100%{
	-webkit-transform: translateX(0);
	border: 1px solid #aaa;
}

10%,30%,50%,70%,90%{
-webkit-transform








:translateX(-10px)








}
20%,40%,60%,80%{
-webkit-transform:translateX(10px);
border:1px solid red;
}
}
@
-moz-keyframes shake { 0%,100%{
	-moz-transform: translateX(0);
	border: 1px solid #aaa;
}

10%,30%,50%,70%,90%{
-moz-transform:translateX(-10px)
}
20%,40%,60%,80%{
-moz-transform:translateX(10px);
border:1px solid red ;
}
}
@
-o-keyframes shake { 0%,100%{
	-o-transform: translateX(0);
	border: 1px solid #aaa;
}
10%,30%,50%,70%,90%{
-o-transform:translateX(-10px)}
20%,40%,60%,80%{
-o-transform:translateX(10px);
border 1px solid red;
}
}
@
keyframes shake { 0%,100%{
	transform: translateX(0);
	border: 1px solid #aaa;
}

10%,30%,50%,70%,90%{
transform:translateX(-10px)
}
20%,40%,60%,80%{
transform:translateX(10px);
border:1px solid red;
}
}
#sdate, #edate, #benchmarkYear {
	width: 100px;
	display: inline-block;
	background-color: white;
}

.version {
	font-size: 10px;
	position: relative;
	top: -20px;
}

canvas {
	position: absolute;
	margin: 0;
}

.under-line-form .form-horizontal input[type="text"], .form-horizontal textarea, .form-horizontal textarea:focus {
	border: none;
	box-shadow: none;
	border-bottom: 1px solid #333;
	border-radius: 0;
	font-size: 18px;
	color: #000;
}

label {
	font-weight: normal;
}

.form-level label {
	border: 1px solid #eee;
	padding: 5px;
	text-align: center　 !important;
	border-radius: 5px;
}

.form-level .control-label {
	text-align: center;
	margin: 2px 0;
}

.form-level input {
	display: none !important;
}

.form-level .select {
	background-color: #5CB85C;
}
.formselect{
    height: 30px;
    padding: 5px 10px;
    font-size: 12px;
    line-height: 1.5;
    border-radius: 3px;
}
/*  医院类型 */
.form-level-report-type label {
	border: 1px solid #eee;
	padding: 5px;
	text-align: center　 !important;
	border-radius: 5px;
}

.form-level-report-type  {
	text-align: center;
	margin: 2px 0;
}

.form-level-report-type input {
	display: none !important;
}

.form-level-report-type .select{
	background-color: #5CB85C;
}
.panel-header, .panel-body {
    border-width: 1px;
    border-style: none;
}
</style>
</head>
<body>
	<canvas id="bg_canvas"></canvas>
	
	<div class="container-fluid" >
		<div class="row">
			<div class="col-md-12">
				<div class="row">
					<div class="col-md-12">
						<h2 align="center">
							分析报告导出
						</h2>
					</div>
				</div>
				<div class="row">
					<div class="col-md-12">
						<div id="card">
							<div class="center-block under-line-form" id="hospInfo"
								style="position: relative;">
								<div class="row">
									<div class="col-md-12">
										<h4>
											<i class="fa fa-hospital fa-lg text-blue"></i>&nbsp;&nbsp;医院基本情况
										</h4>
									</div>
								</div>
								<form class="form-horizontal" id="hospForm">
								   <div class="row">
										<label class="col-md-3 control-label ">医院名称：</label> <input
											type="text" class=" col-md-6 form-control"
											name="hospName" id="hospName" required="required"
											value="东华">
									</div>
									<div class="row">
										<label class="col-md-3 control-label ">建院时间：</label> <input
											type="text" class=" col-md-6 form-control"
											name="hospBuildYear" id="hospBuildYear" required="required"
											value="1949">
									</div>
									<div class="row">
										<label class="col-md-3 control-label ">医院级别：</label>
										<div class="col-md-9 form-level">
											<div class="row">
												<label for="3A" class="col-md-4 control-label select"
													style="margin-left: 0px;">三级甲等</label> <input type="radio"
													class="form-control" name="hospLevel" id="3A" value="三级甲等"
													checked="checked"> <label for="3B"
													class="col-md-4 control-label">三级乙等</label> <input
													type="radio" class="form-control" name="hospLevel" id="3B"
													value="三级乙等"> <label for="2A"
													class="col-md-4 control-label">二级甲等</label> <input
													type="radio" class="form-control" name="hospLevel" id="2A"
													value="二级甲等"> <label for="2B"
													class="col-md-4 control-label">二级乙等</label> <input
													type="radio" class="form-control" name="hospLevel" id="2B"
													value="二级乙等"> <label for="2"
													class="col-md-4 control-label">二级</label> <input
													type="radio" class="form-control" name="hospLevel" id="2"
													value="二级"> <label for="1A"
													class="col-md-4 control-label">一级甲等</label> <input
													type="radio" class="form-control" name="hospLevel" id="1A"
													value="一级甲等"> <label for="1B"
													class="col-md-4 control-label">一级乙等</label> <input
													type="radio" class="form-control" name="hospLevel" id="1B"
													value="一级乙等"> <label for="1"
													class="col-md-4 control-label">一级</label> <input
													type="radio" class="form-control" name="hospLevel" id="1"
													value="一级"> <label for="C"
													class="col-md-4 control-label">未评</label> <input
													type="radio" class="form-control" name="hospLevel" id="C"
													value="未评">
											</div>
										</div>
									</div>
									  	<div class="row">
									<label class="col-md-3 control-label-report" style="margin-top:8px;">医院类型：</label>
									<div class="col-md-9 form-level-report-type">
									<div class="row"> 
									    <label for="wordDRGsReport_AType" class="col-md-4 control-label-report select" style="margin-left: 0px;">综合医院</label> 
									    <input type="radio" class="form-control" name="hospType" id="wordDRGsReport_AType" value="综合医院"  checked="checked"  />  
										<label for="wordDRGsReport_BType" class="col-md-4 control-label-report " >中医医院</label> 
										<input type="radio" class="form-control" name="hospType" id="wordDRGsReport_BType" value="中医医院"  > 
										<label for="wordDRGsReport_CType" class="col-md-4 control-label-report" >专科医院</label> 
										<input type="radio" class="form-control" name="hospType" id="wordDRGsReport_CType" value="专科医院"  >  
									</div>
									</div>
									</div> 
									<div class="row">
										<label for="hospBedNum" class="col-md-3 control-label">核定床位数：</label>
										<input type="text" class=" col-md-3 form-control"
											name="hospBedNum" id="hospBedNum" required="required"
											value="1"> <label for="hospRealBedNum"
											class="col-md-3 control-label">实际床位数：</label> <input
											type="text" class="col-md-3 form-control"
											name="hospRealBedNum" id="hospRealBedNum" required="required"
											value="1">
									</div>
									<div class="row">
										<label for="hospCaseNum" class="col-md-3 control-label">年门急诊量：</label>
										<input type="text" class=" col-md-3 form-control"
											name="hospCaseNum" id="hospCaseNum" required="required"
											value="1"> <label for="hospDocNum"
											class="col-md-3 control-label">医师数量：</label> <input
											type="text" class="col-md-3 form-control" name="hospDocNum"
											id="hospDocNum" required="required" value="1">
									</div>
									<div class="row">
										<label for="hospDocNum" class="col-md-3 control-label">
											开放总床日数：</label> <input type="text" class="col-md-3 form-control"
											name="hospBedDaysNum" id="hospBedDaysNum" required="required"
											value="1">
									</div>
									<div class="row">
										<label for="specCode" class="col-md-3 control-label">重点临床专业：</label>
										<span  style="float: left; margin-left: 1px;padding-top: 5px;"> 
										   <select id="specCodeID" class="formselect szySpecCode" style="width: 120px;font-size: 15px;padding:0px 0px 0px 20px;"></select>  </span>
									</div>

								    <div class="row" >	
									<div style="margin-left:10px;">			
									<label style="float: left;margin-left:10px; padding-top: 5px;">临床专业划分：</label>
									<span id="isInmedical" style="float: left; margin-left: 31px;padding-top: 5px;font-size: 16px;">
									<i class='input_style radio_bg radio_bg_check'> <input  type="radio" name="isInmedical" value="1" class="szyword"></i>&nbsp;&nbsp;内科
									<i class='input_style radio_bg'> <input  type="radio" name="isInmedical" value="2" class="szyword"></i>&nbsp;&nbsp;外科
									</span>
									</div>
									</div>		
									
								    <div class="row" >	
									<div style="margin-left:10px;">			
									<label style="float: left;margin-left:0px;padding-top: 5px;">是否检测数据完整性：</label>
									<span id="isCompleteId" style="float: left; margin-left: 5px;padding-top: 5px;font-size: 16px;">
									<i class='input_style radio_bg radio_bg_check'> <input  type="radio" name="isComplete" value="1" class="szyword">
									     </i>&nbsp;&nbsp;是&nbsp;&nbsp;&nbsp;
									<i class='input_style radio_bg'> <input  type="radio" name="isComplete"value="0" class="szyword"></i>&nbsp;&nbsp;否
									</span>
									</div>
									</div>		
									
									<div class="row" >	
									<div style="margin-left:10px;">			
									<label style="float: left;margin-left:10px;padding-top: 5px;">是否精细化：</label>
									<span id="isRefineId" style="float: left; margin-left: 43px;padding-top: 5px;font-size: 16px;">
									<i class='input_style radio_bg radio_bg_check'> <input  type="radio" name="isRefine" value="1" class="szyword">
									     </i>&nbsp;&nbsp;是&nbsp;&nbsp;&nbsp;
									<i class='input_style radio_bg'> <input  type="radio" name="isRefine" value="0" class="szyword"></i>&nbsp;&nbsp;否
									</span>
									</div>
									</div>	
									
									<div class="row">
										<div class="col-sm-12">
											<span style="color: red;"> *注：重点临床专业每次仅选一个，且选择该专业对应的内外科。&&nbsp;&nbsp;精细化是指系统中除第五章外是否关联临床专业与病组的关系（第五章已关联）。</span>
										</div>
									</div>
									<div class="row">
										<div class="panel panel-success" id="exportResult">
											<div class="panel-heading text-left"><i class=" icon-bar-chart"></i>&nbsp;生成报告</div>
											<div class="panel-body" style="background-color: #f9f9f9;">
											<div style="float: left;">
												<table
													style="width: 100%; margin-bottom: 10px; text-align: left;">
													<tr>
														<td>&nbsp;</td>
													</tr>
													<tr>
														<td>日期区间：<input class="form-control" id="sdate">&nbsp;-&nbsp;<input class="form-control" id="edate">
														<a type="button" id="announcementsBtn" class="btn btn-success" style="margin-left: 10px;" download="分析报告注意事项.doc" href="<%= request.getContextPath() %>/pages/simpreport/newAnnouncements.docx"><i class=" icon-save"></i>下载注意事项</a>
														</td>
													</tr>
												
													<tr>
														<td>&nbsp;</td>
													</tr>
													<tr>
														<td>
															<button id="generateAnalysisBtn" type="button" class="btn btn-success" style="margin-left: 42%;"><i class="fa fa-cog fa-fw"></i>生成报告&nbsp;&nbsp;</button>
														</td>
													</tr>
												</table>
											
												
											</div>
											<div class="panel-footer1"></div>
										</div>
									</div>
							</div>

						</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
	</div>
	<div class="row" id="t2" style="display:none">
		<div class="col-md-12">
			<div class="panel panel-success" id="chart_panel" >
				<div class="panel-heading text-left">生成的图表：</div>
				<div class=" text-center">
					<!-- 为 ECharts 准备一个具备大小（宽高）的Dom -->
					<div>
					<div class="row">
						<div class="col-md-6">
							<div id="imageOne" style=" margin-left:30px; width: 350px; height: 350px;"></div>
						</div>
					</div>
					<div class="szyEcharsTitle" style="margin-left:30px;"><span style="margin-left:50px; font-size: 15px; float:left; margin-top: 10px;">&nbsp;&nbsp;主要手术各级病例数分布占比情况&nbsp;&nbsp;</span></div>
					</div>
					
					<div class="row">
						<div class="col-md-12">
							<div id="imageTwo" style="width: 1000px; height: 450px;"></div>
						</div>

					</div>
					<div class="szyEcharsTitle" style="margin-left:30px;"><span style="margin-left:350px; font-size: 15px;  margin-top: 10px; float: left;">&nbsp;&nbsp;排名前二十名手术柱形图&nbsp;&nbsp;</span></div>
					
					<div class="row">
					
						<div class="col-md-12">
							<div id="imageThree" style="width: 1000px; height: 450px;"></div>
						</div>

					</div>
					<div class="szyEcharsTitle" style="margin-left:30px;"><span style="margin-left:350px; float: left; font-size: 15px; margin-top: 10px;">&nbsp;&nbsp;十八个重点手术柱形图&nbsp;&nbsp;</span></div>
				
					
					<div class="row"  style=" margin-top: 40px;" >

						<div class="col-md-6">
							<div id="imageFour" style="margin-left:30px; width: 350px; height: 350px;"></div>
						</div>
						<div class="col-md-6">
							<div id="imageFive" style="width: 350px; height: 350px;"></div>
						</div>

					</div>
					<div class="row">
						<div class="col-md-6">
							<div class="szyEcharsTitle" style="margin-left:30px;"><span style="margin-left:50px; font-size: 15px; margin-top: 10px;float:left;">&nbsp;&nbsp;DRG病组类型分布图&nbsp;&nbsp;</span></div>
						</div>
						<div class="col-md-6">
							<div class="szyEcharsTitle" style="margin-left:30px;"><span style="margin-left:50px; font-size: 15px; margin-top: 10px;float:left;">&nbsp;&nbsp;DRG病例类型分布图&nbsp;&nbsp;</span></div>
						</div>
					</div>
					<div class="row">
						<div class="col-md-6">
							<div id="imageSix" style="margin-left:30px; width: 350px; height: 350px;"></div>
						</div>
						<div class="col-md-6">
							<div id="imageSeven" style="width: 500px; height: 350px;"></div>
						</div>
					</div>
					
					<div class="row">
						<div class="col-md-6">
							<div class="szyEcharsTitle" style="margin-left:30px;"><span style="margin-left:50px; font-size: 15px; margin-top: 10px;float:left;">&nbsp;&nbsp;DRG病组复杂程度分布图&nbsp;&nbsp;</span></div>
						</div>
						<div class="col-md-6">
							<div class="szyEcharsTitle" style="margin-left:30px;"><span style="margin-left:50px; font-size: 15px; margin-top: 10px;float:left;">&nbsp;&nbsp;DRG病例复杂程度分布图&nbsp;&nbsp;</span></div>
						</div>
					</div>
					
					<div class="row">
					
						<div class="col-md-12">
							<div id="imageEight" style="width: 1000px; height: 450px;"></div>
						</div>

					</div>
					<div class="szyEcharsTitle" style="margin-left:30px;"><span style="margin-left:350px; float: left; font-size: 15px; margin-top: 10px;">&nbsp;&nbsp;RW分布面积图&nbsp;&nbsp;</span></div>
					<div class="row">
					
						<div class="col-md-12">
							<div id="imageNine" style="width: 1000px; height: 450px;"></div>
						</div>

					</div>
					<div class="szyEcharsTitle" style="margin-left:30px;"><span style="margin-left:350px; float: left; font-size: 15px; margin-top: 10px;">&nbsp;&nbsp;总权重排名前十的临床专业CMI和DRG组数分布图&nbsp;&nbsp;</span></div>
					<div class="row">
					
						<div class="col-md-12">
							<div id="imageTen" style="width: 1000px; height: 450px;"></div>
						</div>

					</div>
					<div class="szyEcharsTitle" style="margin-left:30px;"><span style="margin-left:350px; float: left; font-size: 15px; margin-top: 10px;">&nbsp;&nbsp;总权重排名前十的临床专业DRG病组复杂程度分布图&nbsp;&nbsp;</span></div>
					<div class="row">
					
						<div class="col-md-12">
							<div id="imageEleven" style="width: 1000px; height: 450px;"></div>
						</div>

					</div>
					<div class="szyEcharsTitle" style="margin-left:30px;"><span style="margin-left:350px; float: left; font-size: 15px; margin-top: 10px;">&nbsp;&nbsp;各临床专业费用和时间消耗指数象限分布图&nbsp;&nbsp;</span></div>
					<div class="row">
					
						<div class="col-md-12">
							<div id="imageTwelve" style="width: 1000px; height: 450px;"></div>
						</div>

					</div>
					<div class="szyEcharsTitle" style="margin-left:30px;"><span style="margin-left:350px; float: left; font-size: 15px; margin-top: 10px;">&nbsp;&nbsp;重点临床专业RW分布面积图&nbsp;&nbsp;</span></div>
					<div class="row">
					
						<div class="col-md-12">
							<div id="imageFourteen" style="width: 1000px; height: 450px;"></div>
						</div>

					</div>
					<div class="szyEcharsTitle" style="margin-left:30px;"><span style="margin-left:350px; float: left; font-size: 15px; margin-top: 10px;">&nbsp;&nbsp;重点临床专业各手术级别病例分布图&nbsp;&nbsp;</span></div>
					
					<div class="row">

						<div class="col-md-6">
							<div id="imageThirteen" style="width: 500px; height: 350px;"></div>
						</div>
						<div class="col-md-6">
							<div id="imageFifteen" style="width: 480px; height: 350px;"></div>
						</div>

					</div>
					<div class="row">
						<div class="col-md-6">
							<div class="szyEcharsTitle" style="margin-left:30px;"><span style="margin-left:50px; font-size: 15px; margin-top: 10px;float:left;">&nbsp;&nbsp;重点临床专业例数最多的十种手术分布图&nbsp;&nbsp;</span></div>
						</div>
						<div class="col-md-6">
							<div class="szyEcharsTitle" style="margin-left:30px;"><span style="margin-left:50px; font-size: 15px; margin-top: 10px;float:left;">&nbsp;&nbsp;DRG病例未入组原因分布图&nbsp;&nbsp;</span></div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	
	
	<script type="text/javascript">
		$(document).ready(function() {
					//第一次进来判断是否配置分组方案
					groupSchemaConfig.hospCode=paramTabPage[tabId].hospCode ; 
					if(isEmpty(groupSchemaConfig.selectedGroupScheme) || isEmpty(groupSchemaConfig.hospCode)){
						//使用方法名字执行方法 
						switchDialog.show();
					}
					//判断字符是否为空的方法
					function isEmpty(obj){
					    if(typeof obj == "undefined" || obj == null || obj == ""){
					        return true;
					    }else{
					        return false;
					    }
					}
					
					//获取当前系统库中所有的临床专业
					$.ajax({
						type : "post",
						url : contextPath + "/analysisDRGsReport/getARBenchSpecCode.dhc",
						data : "",
						success : function(result) {
							if (result.success) {
								var data = result.data;
								$('#'+tabId+' #specCodeID').html('');
								if(data==null){
									  	drgUI.warning('请在科室设置中配置临床专业！');
										$('#'+tabId+' #specCodeID').append('<option value="no">--无--</option>');
								}else{
									for(var i in data){
										$('#'+tabId+' #specCodeID').append('<option value='+data[i].CODE+'>'+data[i].DECC+'</option>');
									}
								}
							}
						}
					});
					$("#" + tabId + " #sdate").val(
							new Date().getFullYear() - 1 + '-01-01');
					$("#" + tabId + " #edate").val(
							new Date().getFullYear() - 1 + '-12-31');
					$("#" + tabId + " #sdate").datetimepicker({
						format : "yyyy-mm-dd",
						autoclose : true,
						todayBtn : true,
						minView : 2,
						language : 'zh-CN'
					});
					$("#" + tabId + " #edate").datetimepicker({
						format : "yyyy-mm-dd",
						autoclose : true,
						todayBtn : true,
						minView : 2,
						language : 'zh-CN'
					});

					$("#" + tabId + " #hospBuildYear").datetimepicker({
						startView : 'decade',
						minView : 'decade',
						format : 'yyyy',
						autoclose : true
					});
					$('#' + tabId + ' #mdcCode_id').append(
							'<option value="all" selected>全部级别</option>');
				});
	</script>
	<script type="text/javascript"
		src="<%=request.getContextPath()%>/js/simplereport/calculate.js"></script>
	<script type="text/javascript"
		src="<%=request.getContextPath()%>/js/simplereport/analysisDRGsReport.js"></script>
    <script type="text/javascript"
		src="<%=request.getContextPath()%>/js/simplereport/reportDrawCharts.js"></script>
</body>
</html>